<html>
<head>
	<meta charset="UTF-8">
	<meta content="IE=edge" http-equiv="X-UA-Compatible">
	<meta content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no, width=device-width" name="viewport">
	<title>3883：[Wc2015]混淆与破解</title>
	<!-- css -->
	<link href="../css/base.min.css" rel="stylesheet">
	<link href="../css/project.min.css" rel="stylesheet">
	
	<!-- favicon -->
	<!-- ... -->
</head>
<body class="page-brand">
	<header class="header header-transparent header-waterfall ui-header">
		<ul class="nav nav-list pull-left">
			<li>
				<a data-toggle="menu" href="#menu">
					<span class="icon icon-lg">menu</span>
				</a>
			</li>
		</ul>
		<a class="header-logo header-affix-hide margin-left-no margin-right-no" data-offset-top="213" data-spy="affix">[Wc2015]混淆与破解</a>
		<span class="header-logo header-affix margin-left-no margin-right-no" data-offset-top="213" data-spy="affix">[Wc2015]混淆与破解</span>
	</header>
	<nav aria-hidden="true" class="menu" id="menu" tabindex="-1">
		<div class="menu-scroll">
			<div class="menu-content">
				<a class="menu-logo" href="../index.html">BZOJ离线题库</a>
				<ul class="nav">
					<li>
						<a class="waves-attach" data-toggle="collapse" href="#problems">题目</a>
						<ul class="menu-collapse collapse in" id="problems">
							<li>
								<a class="waves-attach" href="../index.html">主页</a>
							</li>
							<li>
								<a class="waves-attach" href="../list.html">题目列表</a>
							</li>
						</ul>
					</li>
					<li>
						<a class="collapsed waves-attach" data-toggle="collapse" href="#about">关于</a>
						<ul class="menu-collapse collapse" id="about">
							<li>
								<a class="waves-attach" href="../about.html">关于此项目</a>
							</li>
						</ul>
					</li>
					
				</ul>
			</div>
		</div>
	</nav>
	<main class="content">
		<div class="content-header ui-content-header">
			<div class="container">
				<h1 class="content-heading">
                [Wc2015]混淆与破解                </h1>
                <p>时间限制：10s&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  空间限制：256MB</p>			</div>
		</div>
		<div class="container">
			<section class="content-inner margin-top-no">
				<div class="row">
					<div class="col-lg-13 col-md-13">
						<div class="card margin-bottom-no">
							<div class="card-main">
								<div class="card-inner">
									
                                <h3>题目描述</h3><p><p>&nbsp;<img width="0" height="0" src="../file/3883_0.jpg" alt="" /><img width="1176" height="782" alt="" src="../file/3883_1.jpg" /></p></p><hr/><h3>输入格式</h3><p><p><img width="412" height="92" alt="" src="../file/3883_0.png" /></p></p><hr/><h3>输出格式</h3><p><p>&nbsp;<img width="0" height="0" src="../file/3883_0.png" alt="" /><img width="1164" height="85" alt="" src="../file/3883_1.png" /></p></p><hr/><h3>样例输入</h3><pre>3 2 4 1
0 1 2 2 2</pre><hr/><h3>样例输出</h3><pre>001
010
1110</pre><hr/><h3>提示</h3><p><p>样例输入等价于如下代码<br />
y[] = 0000 input x[0..n-1] y[0..n-1] = x[0..n-1] y[0] = (not (y[1] and y[2])) xor y[2] xor y[2] output y[0]<br />
其中 x[0..n-1] 表示 01 串 x 的第 0 位到第 n&minus;1 位。<br />
在这段代码中，每一种输入对应的输出如下：<br />
input &nbsp;&nbsp;&nbsp; 000 &nbsp;&nbsp;&nbsp; 001 &nbsp;&nbsp;&nbsp; 010 &nbsp;&nbsp;&nbsp; 011 &nbsp;&nbsp;&nbsp; 100 &nbsp;&nbsp;&nbsp; 101 &nbsp;&nbsp;&nbsp; 110 &nbsp;&nbsp;&nbsp; 111<br />
output &nbsp;&nbsp;&nbsp; 1 &nbsp;&nbsp;&nbsp; 1 &nbsp;&nbsp;&nbsp; 1 &nbsp;&nbsp;&nbsp; 0 &nbsp;&nbsp;&nbsp; 1 &nbsp;&nbsp;&nbsp; 1 &nbsp;&nbsp;&nbsp; 1 &nbsp;&nbsp;&nbsp; 0<br />
样例输出是一种破解方案，等价于如下代码：<br />
input x[0..n-1] z[0] = x[2] z[1] = x[1] output h(z[])<br />
h 函数的输入和输出有如下对应关系：<br />
z[] &nbsp;&nbsp;&nbsp; 00 &nbsp;&nbsp;&nbsp; 01 &nbsp;&nbsp;&nbsp; 10 &nbsp;&nbsp;&nbsp; 11<br />
h(z[]) &nbsp;&nbsp;&nbsp; 1 &nbsp;&nbsp;&nbsp; 1 &nbsp;&nbsp;&nbsp; 1 &nbsp;&nbsp;&nbsp; 0<br />
可以发现，对于每一种输入，破解版算法和混淆版算法的输出是相同的。<br />
对于所有的数据，1&le;n&le;64，1&le;L&le;256，1&le;Q&le;1024，0&le;p&le;0.01，0&le;u,v,s,d,e&lt;L（注意，输入中并没有把 p 的值给你）。<br />
<br />
提示<br />
使用位运算一次在多个输入上求出函数值可以极大的加速你的程序。<br />
数据范围<br />
1&lt;=N&lt;=64,1&lt;=L&lt;=256,1&lt;=Q&lt;=1024,0&lt;=P&lt;=0.01,0&lt;=U,V,S,D,E&lt;=L</p></p><hr/><h3>题目来源</h3><p>没有写明来源</p>
								</div>
							</div>
						</div>
					</div>
				</div>
				
				
			</section>
		</div>
	</main>

	<div class="fbtn-container">
		<div class="fbtn-inner">
			<a class="fbtn fbtn-lg fbtn-brand-accent waves-attach waves-circle waves-light waves-effect" data-toggle="dropdown" aria-expanded="true"><span class="fbtn-text fbtn-text-left">Menu</span><span class="fbtn-ori icon">apps</span><span class="fbtn-sub icon">close</span></a>
			<div class="fbtn-dropup">
				<a class="fbtn fbtn-brand waves-attach waves-circle waves-light waves-effect" href="../list.html" target="_self"><span class="fbtn-text fbtn-text-left">题目列表</span><span class="icon">menu</span></a>
				<a class="fbtn fbtn-green waves-attach waves-circle waves-effect" href="../index.html" target="_self"><span class="fbtn-text fbtn-text-left">返回主页</span><span class="icon">home</span></a>
				<a class="fbtn waves-attach waves-circle waves-effect" href="http://www.lydsy.com/JudgeOnline/submitpage.php?id=3883" target="_blank"><span class="fbtn-text fbtn-text-left">提交代码</span><span class="icon">send</span></a>
				<a class="fbtn fbtn-orange waves-attach waves-circle waves-effect" href="http://www.lydsy.com/JudgeOnline/wttl/wttl.php?pid=3883" target="_blank"><span class="fbtn-text fbtn-text-left">试题讨论</span><span class="icon">chat</span></a>
				
			</div>
		</div>
	</div>

	<!-- js -->
	<script src="../js/jquery.min.js"></script>
	<script src="../js/base.min.js"></script>
	<script src="../js/project.min.js"></script>
</body>
</html>